3.459 \(\int \frac{\sec ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx\)

Optimal. Leaf size=192 \[ -\frac{3 b^2 \left (4 a^2+b^2\right ) \tan ^{-1}\left (\frac{a \tan \left (\frac{1}{2} (c+d x)\right )+b}{\sqrt{a^2-b^2}}\right )}{d \left (a^2-b^2\right )^{7/2}}+\frac{5 a b \sec (c+d x)}{2 d \left (a^2-b^2\right )^2 (a+b \sin (c+d x))}+\frac{b \sec (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sin (c+d x))^2}-\frac{\sec (c+d x) \left (3 b \left (4 a^2+b^2\right )-a \left (2 a^2+13 b^2\right ) \sin (c+d x)\right )}{2 d \left (a^2-b^2\right )^3} \]

[Out]

(-3*b^2*(4*a^2 + b^2)*ArcTan[(b + a*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d) + (b*Sec[c + d*x
])/(2*(a^2 - b^2)*d*(a + b*Sin[c + d*x])^2) + (5*a*b*Sec[c + d*x])/(2*(a^2 - b^2)^2*d*(a + b*Sin[c + d*x])) -
(Sec[c + d*x]*(3*b*(4*a^2 + b^2) - a*(2*a^2 + 13*b^2)*Sin[c + d*x]))/(2*(a^2 - b^2)^3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.391201, antiderivative size = 192, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {2694, 2864, 2866, 12, 2660, 618, 204} \[ -\frac{3 b^2 \left (4 a^2+b^2\right ) \tan ^{-1}\left (\frac{a \tan \left (\frac{1}{2} (c+d x)\right )+b}{\sqrt{a^2-b^2}}\right )}{d \left (a^2-b^2\right )^{7/2}}+\frac{5 a b \sec (c+d x)}{2 d \left (a^2-b^2\right )^2 (a+b \sin (c+d x))}+\frac{b \sec (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sin (c+d x))^2}-\frac{\sec (c+d x) \left (3 b \left (4 a^2+b^2\right )-a \left (2 a^2+13 b^2\right ) \sin (c+d x)\right )}{2 d \left (a^2-b^2\right )^3} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^2/(a + b*Sin[c + d*x])^3,x]

[Out]

(-3*b^2*(4*a^2 + b^2)*ArcTan[(b + a*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d) + (b*Sec[c + d*x
])/(2*(a^2 - b^2)*d*(a + b*Sin[c + d*x])^2) + (5*a*b*Sec[c + d*x])/(2*(a^2 - b^2)^2*d*(a + b*Sin[c + d*x])) -
(Sec[c + d*x]*(3*b*(4*a^2 + b^2) - a*(2*a^2 + 13*b^2)*Sin[c + d*x]))/(2*(a^2 - b^2)^3*d)

Rule 2694

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> -Simp[(b*(g
*Cos[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^(m + 1))/(f*g*(a^2 - b^2)*(m + 1)), x] + Dist[1/((a^2 - b^2)*(m +
1)), Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m + 1)*(a*(m + 1) - b*(m + p + 2)*Sin[e + f*x]), x], x] /; F
reeQ[{a, b, e, f, g, p}, x] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && IntegersQ[2*m, 2*p]

Rule 2864

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.)
+ (f_.)*(x_)]), x_Symbol] :> -Simp[((b*c - a*d)*(g*Cos[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^(m + 1))/(f*g*(a
^2 - b^2)*(m + 1)), x] + Dist[1/((a^2 - b^2)*(m + 1)), Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m + 1)*Sim
p[(a*c - b*d)*(m + 1) - (b*c - a*d)*(m + p + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p}, x]
 && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && IntegerQ[2*m]

Rule 2866

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.)
 + (f_.)*(x_)]), x_Symbol] :> Simp[((g*Cos[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^(m + 1)*(b*c - a*d - (a*c -
b*d)*Sin[e + f*x]))/(f*g*(a^2 - b^2)*(p + 1)), x] + Dist[1/(g^2*(a^2 - b^2)*(p + 1)), Int[(g*Cos[e + f*x])^(p
+ 2)*(a + b*Sin[e + f*x])^m*Simp[c*(a^2*(p + 2) - b^2*(m + p + 2)) + a*b*d*m + b*(a*c - b*d)*(m + p + 3)*Sin[e
 + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && NeQ[a^2 - b^2, 0] && LtQ[p, -1] && IntegerQ[2*m]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2660

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x]}, Dis
t[(2*e)/d, Subst[Int[1/(a + 2*b*e*x + a*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] &&
 NeQ[a^2 - b^2, 0]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\sec ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx &=\frac{b \sec (c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}-\frac{\int \frac{\sec ^2(c+d x) (-2 a+3 b \sin (c+d x))}{(a+b \sin (c+d x))^2} \, dx}{2 \left (a^2-b^2\right )}\\ &=\frac{b \sec (c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}+\frac{5 a b \sec (c+d x)}{2 \left (a^2-b^2\right )^2 d (a+b \sin (c+d x))}+\frac{\int \frac{\sec ^2(c+d x) \left (2 a^2+3 b^2-10 a b \sin (c+d x)\right )}{a+b \sin (c+d x)} \, dx}{2 \left (a^2-b^2\right )^2}\\ &=\frac{b \sec (c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}+\frac{5 a b \sec (c+d x)}{2 \left (a^2-b^2\right )^2 d (a+b \sin (c+d x))}-\frac{\sec (c+d x) \left (3 b \left (4 a^2+b^2\right )-a \left (2 a^2+13 b^2\right ) \sin (c+d x)\right )}{2 \left (a^2-b^2\right )^3 d}-\frac{\int \frac{3 b^2 \left (4 a^2+b^2\right )}{a+b \sin (c+d x)} \, dx}{2 \left (a^2-b^2\right )^3}\\ &=\frac{b \sec (c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}+\frac{5 a b \sec (c+d x)}{2 \left (a^2-b^2\right )^2 d (a+b \sin (c+d x))}-\frac{\sec (c+d x) \left (3 b \left (4 a^2+b^2\right )-a \left (2 a^2+13 b^2\right ) \sin (c+d x)\right )}{2 \left (a^2-b^2\right )^3 d}-\frac{\left (3 b^2 \left (4 a^2+b^2\right )\right ) \int \frac{1}{a+b \sin (c+d x)} \, dx}{2 \left (a^2-b^2\right )^3}\\ &=\frac{b \sec (c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}+\frac{5 a b \sec (c+d x)}{2 \left (a^2-b^2\right )^2 d (a+b \sin (c+d x))}-\frac{\sec (c+d x) \left (3 b \left (4 a^2+b^2\right )-a \left (2 a^2+13 b^2\right ) \sin (c+d x)\right )}{2 \left (a^2-b^2\right )^3 d}-\frac{\left (3 b^2 \left (4 a^2+b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{a+2 b x+a x^2} \, dx,x,\tan \left (\frac{1}{2} (c+d x)\right )\right )}{\left (a^2-b^2\right )^3 d}\\ &=\frac{b \sec (c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}+\frac{5 a b \sec (c+d x)}{2 \left (a^2-b^2\right )^2 d (a+b \sin (c+d x))}-\frac{\sec (c+d x) \left (3 b \left (4 a^2+b^2\right )-a \left (2 a^2+13 b^2\right ) \sin (c+d x)\right )}{2 \left (a^2-b^2\right )^3 d}+\frac{\left (6 b^2 \left (4 a^2+b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-4 \left (a^2-b^2\right )-x^2} \, dx,x,2 b+2 a \tan \left (\frac{1}{2} (c+d x)\right )\right )}{\left (a^2-b^2\right )^3 d}\\ &=-\frac{3 b^2 \left (4 a^2+b^2\right ) \tan ^{-1}\left (\frac{b+a \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^2-b^2}}\right )}{\left (a^2-b^2\right )^{7/2} d}+\frac{b \sec (c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}+\frac{5 a b \sec (c+d x)}{2 \left (a^2-b^2\right )^2 d (a+b \sin (c+d x))}-\frac{\sec (c+d x) \left (3 b \left (4 a^2+b^2\right )-a \left (2 a^2+13 b^2\right ) \sin (c+d x)\right )}{2 \left (a^2-b^2\right )^3 d}\\ \end{align*}

Mathematica [A]  time = 3.05529, size = 193, normalized size = 1.01 \[ \frac{-\frac{6 b^2 \left (4 a^2+b^2\right ) \tan ^{-1}\left (\frac{a \tan \left (\frac{1}{2} (c+d x)\right )+b}{\sqrt{a^2-b^2}}\right )}{\left (a^2-b^2\right )^{7/2}}+\frac{b^3 \cos (c+d x) \left (-8 a^2-7 a b \sin (c+d x)+b^2\right )}{(a-b)^3 (a+b)^3 (a+b \sin (c+d x))^2}+\sin \left (\frac{1}{2} (c+d x)\right ) \left (\frac{2}{(a-b)^3 \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )}+\frac{2}{(a+b)^3 \left (\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )\right )}\right )}{2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^2/(a + b*Sin[c + d*x])^3,x]

[Out]

((-6*b^2*(4*a^2 + b^2)*ArcTan[(b + a*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^2 - b^2)^(7/2) + Sin[(c + d*x)/2]*
(2/((a + b)^3*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])) + 2/((a - b)^3*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2]))) +
(b^3*Cos[c + d*x]*(-8*a^2 + b^2 - 7*a*b*Sin[c + d*x]))/((a - b)^3*(a + b)^3*(a + b*Sin[c + d*x])^2))/(2*d)

________________________________________________________________________________________

Maple [B]  time = 0.092, size = 705, normalized size = 3.7 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^2/(a+b*sin(d*x+c))^3,x)

[Out]

-1/d/(a+b)^3/(tan(1/2*d*x+1/2*c)-1)-1/d/(a-b)^3/(tan(1/2*d*x+1/2*c)+1)-9/d*b^4/(a-b)^3/(a+b)^3/(tan(1/2*d*x+1/
2*c)^2*a+2*tan(1/2*d*x+1/2*c)*b+a)^2*a*tan(1/2*d*x+1/2*c)^3+2/d*b^6/(a-b)^3/(a+b)^3/(tan(1/2*d*x+1/2*c)^2*a+2*
tan(1/2*d*x+1/2*c)*b+a)^2/a*tan(1/2*d*x+1/2*c)^3-8/d*b^3/(a-b)^3/(a+b)^3/(tan(1/2*d*x+1/2*c)^2*a+2*tan(1/2*d*x
+1/2*c)*b+a)^2*a^2*tan(1/2*d*x+1/2*c)^2-15/d*b^5/(a-b)^3/(a+b)^3/(tan(1/2*d*x+1/2*c)^2*a+2*tan(1/2*d*x+1/2*c)*
b+a)^2*tan(1/2*d*x+1/2*c)^2+2/d*b^7/(a-b)^3/(a+b)^3/(tan(1/2*d*x+1/2*c)^2*a+2*tan(1/2*d*x+1/2*c)*b+a)^2/a^2*ta
n(1/2*d*x+1/2*c)^2-23/d*b^4/(a-b)^3/(a+b)^3/(tan(1/2*d*x+1/2*c)^2*a+2*tan(1/2*d*x+1/2*c)*b+a)^2*a*tan(1/2*d*x+
1/2*c)+2/d*b^6/(a-b)^3/(a+b)^3/(tan(1/2*d*x+1/2*c)^2*a+2*tan(1/2*d*x+1/2*c)*b+a)^2/a*tan(1/2*d*x+1/2*c)-8/d*b^
3/(a-b)^3/(a+b)^3/(tan(1/2*d*x+1/2*c)^2*a+2*tan(1/2*d*x+1/2*c)*b+a)^2*a^2+1/d*b^5/(a-b)^3/(a+b)^3/(tan(1/2*d*x
+1/2*c)^2*a+2*tan(1/2*d*x+1/2*c)*b+a)^2-12/d*b^2/(a-b)^3/(a+b)^3/(a^2-b^2)^(1/2)*arctan(1/2*(2*a*tan(1/2*d*x+1
/2*c)+2*b)/(a^2-b^2)^(1/2))*a^2-3/d*b^4/(a-b)^3/(a+b)^3/(a^2-b^2)^(1/2)*arctan(1/2*(2*a*tan(1/2*d*x+1/2*c)+2*b
)/(a^2-b^2)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^2/(a+b*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 4.31216, size = 1983, normalized size = 10.33 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^2/(a+b*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

[1/4*(4*a^6*b - 12*a^4*b^3 + 12*a^2*b^5 - 4*b^7 + 2*(4*a^6*b + 10*a^4*b^3 - 17*a^2*b^5 + 3*b^7)*cos(d*x + c)^2
 + 3*((4*a^2*b^4 + b^6)*cos(d*x + c)^3 - 2*(4*a^3*b^3 + a*b^5)*cos(d*x + c)*sin(d*x + c) - (4*a^4*b^2 + 5*a^2*
b^4 + b^6)*cos(d*x + c))*sqrt(-a^2 + b^2)*log(((2*a^2 - b^2)*cos(d*x + c)^2 - 2*a*b*sin(d*x + c) - a^2 - b^2 +
 2*(a*cos(d*x + c)*sin(d*x + c) + b*cos(d*x + c))*sqrt(-a^2 + b^2))/(b^2*cos(d*x + c)^2 - 2*a*b*sin(d*x + c) -
 a^2 - b^2)) - 2*(2*a^7 - 6*a^5*b^2 + 6*a^3*b^4 - 2*a*b^6 - (2*a^5*b^2 + 11*a^3*b^4 - 13*a*b^6)*cos(d*x + c)^2
)*sin(d*x + c))/((a^8*b^2 - 4*a^6*b^4 + 6*a^4*b^6 - 4*a^2*b^8 + b^10)*d*cos(d*x + c)^3 - 2*(a^9*b - 4*a^7*b^3
+ 6*a^5*b^5 - 4*a^3*b^7 + a*b^9)*d*cos(d*x + c)*sin(d*x + c) - (a^10 - 3*a^8*b^2 + 2*a^6*b^4 + 2*a^4*b^6 - 3*a
^2*b^8 + b^10)*d*cos(d*x + c)), 1/2*(2*a^6*b - 6*a^4*b^3 + 6*a^2*b^5 - 2*b^7 + (4*a^6*b + 10*a^4*b^3 - 17*a^2*
b^5 + 3*b^7)*cos(d*x + c)^2 + 3*((4*a^2*b^4 + b^6)*cos(d*x + c)^3 - 2*(4*a^3*b^3 + a*b^5)*cos(d*x + c)*sin(d*x
 + c) - (4*a^4*b^2 + 5*a^2*b^4 + b^6)*cos(d*x + c))*sqrt(a^2 - b^2)*arctan(-(a*sin(d*x + c) + b)/(sqrt(a^2 - b
^2)*cos(d*x + c))) - (2*a^7 - 6*a^5*b^2 + 6*a^3*b^4 - 2*a*b^6 - (2*a^5*b^2 + 11*a^3*b^4 - 13*a*b^6)*cos(d*x +
c)^2)*sin(d*x + c))/((a^8*b^2 - 4*a^6*b^4 + 6*a^4*b^6 - 4*a^2*b^8 + b^10)*d*cos(d*x + c)^3 - 2*(a^9*b - 4*a^7*
b^3 + 6*a^5*b^5 - 4*a^3*b^7 + a*b^9)*d*cos(d*x + c)*sin(d*x + c) - (a^10 - 3*a^8*b^2 + 2*a^6*b^4 + 2*a^4*b^6 -
 3*a^2*b^8 + b^10)*d*cos(d*x + c))]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec ^{2}{\left (c + d x \right )}}{\left (a + b \sin{\left (c + d x \right )}\right )^{3}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**2/(a+b*sin(d*x+c))**3,x)

[Out]

Integral(sec(c + d*x)**2/(a + b*sin(c + d*x))**3, x)

________________________________________________________________________________________

Giac [B]  time = 1.18032, size = 520, normalized size = 2.71 \begin{align*} -\frac{\frac{3 \,{\left (4 \, a^{2} b^{2} + b^{4}\right )}{\left (\pi \left \lfloor \frac{d x + c}{2 \, \pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (a\right ) + \arctan \left (\frac{a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + b}{\sqrt{a^{2} - b^{2}}}\right )\right )}}{{\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} \sqrt{a^{2} - b^{2}}} + \frac{2 \,{\left (a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 3 \, a b^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 3 \, a^{2} b - b^{3}\right )}}{{\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )}} + \frac{9 \, a^{3} b^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 2 \, a b^{6} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 8 \, a^{4} b^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 15 \, a^{2} b^{5} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 2 \, b^{7} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 23 \, a^{3} b^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 2 \, a b^{6} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 8 \, a^{4} b^{3} - a^{2} b^{5}}{{\left (a^{8} - 3 \, a^{6} b^{2} + 3 \, a^{4} b^{4} - a^{2} b^{6}\right )}{\left (a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 2 \, b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + a\right )}^{2}}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^2/(a+b*sin(d*x+c))^3,x, algorithm="giac")

[Out]

-(3*(4*a^2*b^2 + b^4)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(a) + arctan((a*tan(1/2*d*x + 1/2*c) + b)/sqrt(a^2
- b^2)))/((a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6)*sqrt(a^2 - b^2)) + 2*(a^3*tan(1/2*d*x + 1/2*c) + 3*a*b^2*tan(1/2
*d*x + 1/2*c) - 3*a^2*b - b^3)/((a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6)*(tan(1/2*d*x + 1/2*c)^2 - 1)) + (9*a^3*b^4
*tan(1/2*d*x + 1/2*c)^3 - 2*a*b^6*tan(1/2*d*x + 1/2*c)^3 + 8*a^4*b^3*tan(1/2*d*x + 1/2*c)^2 + 15*a^2*b^5*tan(1
/2*d*x + 1/2*c)^2 - 2*b^7*tan(1/2*d*x + 1/2*c)^2 + 23*a^3*b^4*tan(1/2*d*x + 1/2*c) - 2*a*b^6*tan(1/2*d*x + 1/2
*c) + 8*a^4*b^3 - a^2*b^5)/((a^8 - 3*a^6*b^2 + 3*a^4*b^4 - a^2*b^6)*(a*tan(1/2*d*x + 1/2*c)^2 + 2*b*tan(1/2*d*
x + 1/2*c) + a)^2))/d